package com.spring.demo5.eg1;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * @author vhans
 */
@Configuration
public class MainConfig2 {

    // 表示标注的bean不会被处理
    @Conditional(MyCondition1.class)
    @Bean
    public String name() {
        return "Vhans";
    }

    @Bean
    public String address() {
        return "杭州市";
    }
}
